$(function () {


})

function moreList(){
    pageVo.currenPage=pageVo.currenPage+1;
    $(".load-more").show();
    $(".load-more-two").hide();
    $.post(basePath + "home?current=" + pageVo.currenPage,[], function (data) {
        $(".load-more").hide();
        //如果没有数据了就隐藏
        if (data.length == 0) {
            $(".load-more-two").hide();
            if (pageVo.currenPage == 1) {
                $(".no-data").show();
            }
        } else {
            $(".load-more-two").show();
            $("#myContent").append(data);
        }
    });
}


var pageVo={
    currenPage :1,
    pageSize:2
}



var user= {
    selectFun: function (obj, type) {
        var path = window.location.href;
        path = decodeURI(path);
        var str = path.split("/");
        var email = str[str.length - 1];
        $(".user-right-top ul li").removeClass("select-active");
        $(obj).addClass("select-active");
        if (type == 5) {
            user.query("0", email)
        } else if (type == 10) {
            user.query("1", email)
        } else if (type == 15) {
            user.query("2", email)
        } else if (type == 20) {
            user.query("3", email)
        }
    },

    query: function (num, email) {
        $.ajax({
            url: basePath + "uh/" + num + "/" + email,
            type: "GET",
            contentType: "application/json",
            data: null,
            success: function (data) {
                $("#myContent").html(data)
                console.log(data)
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert("66666666666666666")
                alert("链接错误,请联系管理员");
            }
        })
    },

}